package com.iwhalecloud.bss.kite.cucc.web.service.accept.handler.attr;

import com.iwhalecloud.bss.kite.client.dto.cust.ContextCustDTO;
import com.iwhalecloud.bss.kite.client.vo.scene.CommonAttrVO;
import com.iwhalecloud.bss.kite.common.util.KiteBeanUtils;
import com.iwhalecloud.bss.kite.cucc.client.dto.cust.CuccContextCustDTO;
import com.iwhalecloud.bss.kite.web.context.KiteWebContext;
import com.iwhalecloud.bss.kite.web.service.accept.attr.handler.AbstractAttrHandler;
import org.springframework.stereotype.Service;

@Service
public class CustInfoCodeHandler extends AbstractAttrHandler {

    @Override
    public void init(CommonAttrVO commonAttr) {
    	ContextCustDTO cusTDTO = KiteWebContext.getContext().getCust();
        CuccContextCustDTO custDTO = KiteBeanUtils.transform(cusTDTO, CuccContextCustDTO.class);
        commonAttr.setValue(custDTO.getGroupId());
        commonAttr.setValueDesc(custDTO.getGroupId());
        setCommonAttr(commonAttr);
    }

}
